<template>
  <div class="navigation">
    <div class="cell" :class="{'cur':item.id==data.crumbVo.id}" v-for="item in data.thirdTypeVos" :key="item.id" @click="navChange(item.id)">
      <img v-if="item.icon" :src="item.icon" alt="" />
      <i v-else class="el-icon-circle-close"></i>
      <p class="name">{{ item.name }}</p>
    </div>
  </div>
</template>
  
<script setup>
import { defineProps , defineEmits } from "vue";
const emit = defineEmits({
  'navChange': null,
})
let props=defineProps({
  data: {
    type: Array,
    default: ()=>{},
  },
});
const navChange = (id) => {
  emit('navChange',id)
}
</script>
  
  <style lang="less" scoped>
.search-card {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  padding: 10px 20px;

  .search-row {
    display: flex;
    margin: 0px 0 10px 0;
    align-items: center;

    &:last-child {
      margin: 0px 0 0px 0;
    }

    .search-row-title {
      display: flex;
      align-items: center;
      justify-content: center;
      border-radius: 4px;
      font-size: 14px;
      font-weight: 400;
      color: #ffffff;
      line-height: 14px;
      width: 51px;
      height: 24px;
      margin: 0 20px 0 0px;
      // span::after {
      //   content: ":";
      // }
    }
  }

  .search-row-values {
    display: flex;
    // align-items: center;
    flex-flow: row;
    flex-wrap: wrap;
    max-width: 1150px;
    font-size: 14px;
    font-family: PingFangSC-Regular, PingFang SC;
    font-weight: 400;
    color: #1d2127;
    line-height: 2;

    span {
      margin-right: 20px;
      cursor: pointer;
    }

    span:hover {
      color: @link-color;
    }
  }
}
.navigation {
  overflow-x: auto;
  height: 86px;
  background: #ffffff;
  border-radius: 8px;
  padding: 4px 5px;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  .cell {
    margin-right: 7px;
    display: inline-block;
    padding-top: 12px;
    height: 100%;
    width: 90px;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    &:hover {
        background: linear-gradient(180deg, rgba(255, 255, 255, 0) 70%, rgba(71, 183, 82, 0.4) 100%);
    }
    img {
      width: 28px;
      height: 28px;
    }
    i {
      font-size: 28px;
      color: #47B752;
    }
    .name {
      line-height: 14px;
      font-size: 14px;
      color: #1d2127;
    }
  }
  .cur {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0) 70%, rgba(71, 183, 82, 0.4) 100%);
  }
}
</style>